<div class="panel panel-default panel-intro">

    <div class="panel-heading">
        <div class="panel-lead"><em>系统配置</em>根据实际应用场景选择性填写</div>
        <ul class="nav nav-tabs">
            <li class="active"><a href="#tab-base" data-toggle="tab">{:__('基本设置')}</a></li>
            <li><a href="#tab-sms" data-toggle="tab">{:__('短信设置')}</a></li>
            <li><a href="#tab-mp" data-toggle="tab">{:__('公众号设置')}</a></li>
            <li><a href="#tab-notice" data-toggle="tab">{:__('订单通知')}</a></li>
        </ul>
    </div>

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="tab-base">
                <div class="widget-body no-padding">
                    <form id="base-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST">
                        <table class="table table-striped">
                            <tbody>
                                <tr>
                                    <td width="20%">{:__('小程序AppId')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input id="c-base-app_id" class="form-control" type="text" name="row[base][app_id]" title="" value="{$row.base.app_id|default=''}" placeholder="选填" data-tip="如果是小程序方式使用，则必填">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('小程序AppSecret')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input id="c-base-app_secret" class="form-control" type="text" name="row[base][app_secret]" title="" value="{$row.base.app_secret|default=''}" placeholder="选填" data-tip="如果是小程序方式使用，则必填">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('支持的登录方式')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="checkbox">
                                                    {foreach name="loginMethods" item="vo"}
                                                    <label for="row[base][login_methods][]-{$key}"><input id="row[base][login_methods][]-{$key}" type="checkbox" name="row[base][login_methods][]" value="{$key}" data-tip="{$vo.tip}" {in name="key" value="$row.base.login_methods|default=''" }checked{/in}> {$vo.name}</label>
                                                    {/foreach}
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('登录页顶部图片')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="input-group">
                                                    <input id="c-login_top_img" class="form-control" type="text" name="row[base][login_top_img]" value="{$row.base.login_top_img|default=''}" title="" data-rule="required">
                                                    <div class="input-group-addon no-border no-padding">
                                                        <span><button type="button" id="faupload-login_top_img" class="btn btn-danger faupload" data-input-id="c-login_top_img" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-login_top_img"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                        <span><button type="button" id="fachoose-login_top_img" class="btn btn-primary fachoose" data-input-id="c-login_top_img" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                        <span><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" data-trigger="hover" title="推荐图片比例：750*480"><i class="fa fa-question-circle text-gray"></i></button></span>
                                                    </div>
                                                    <span class="msg-box n-right" for="c-login_top_img"></span>
                                                </div>
                                                <ul class="row list-inline faupload-preview" id="p-login_top_img"></ul>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('登录页底部备注')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input id="c-base-login_note" class="form-control" type="text" name="row[base][login_note]" title="" value="{$row.base.login_note|default=''}" placeholder="选填" data-tip="选填，有默认值">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('只在微信小程序使用')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="radio">
                                                    {foreach name="yesOrNo" item="vo"}
                                                    <label for="row[base][only_wechat]-{$key}"><input id="row[base][only_wechat]-{$key}" type="radio" name="row[base][only_wechat]" title="" value="{$key}" data-tip="开启后，登录和短信验证码支持更强大的防刷机制" {in name="key" value="$row.base.only_wechat|default=0"}checked{/in}>{$vo}</label>
                                                    {/foreach}
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('H5域名')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <input id="c-base-h5_domain" class="form-control" type="text" name="row[base][h5_domain]" title="" value="{$row.base.h5_domain|default=''}" placeholder="选填" data-tip="选填，如果H5方式运行，生成二维码时需要填写">
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('后台管理员角色')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <select class="form-control selectpicker" name="row[base][admin_role]" title="">
                                                    {foreach name="roleList" item="vo"}
                                                    <option value="{$key}" {in name="key" value="$row.base.admin_role|default=0"}selected{/in}>{$vo}</option>
                                                    {/foreach}
                                                </select>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('支持订单退款')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="radio">
                                                    {foreach name="yesOrNo" item="vo"}
                                                    <label for="row[base][order_refund]-{$key}"><input id="row[base][order_refund]-{$key}" type="radio" name="row[base][order_refund]" title="" value="{$key}" data-tip="开启后，用户可以发起退款申请" {in name="key" value="$row.base.order_refund|default=0"}checked{/in}>{$vo}</label>
                                                    {/foreach}
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>{:__('支持订单开票')}</td>
                                    <td>
                                        <div class="row">
                                            <div class="col-sm-8 col-xs-12">
                                                <div class="radio">
                                                    {foreach name="yesOrNo" item="vo"}
                                                    <label for="row[base][order_invoice]-{$key}"><input id="row[base][order_invoice]-{$key}" type="radio" name="row[base][order_invoice]" title="" value="{$key}" data-tip="开启后，用户可以发起开票申请" {in name="key" value="$row.base.order_invoice|default=0"}checked{/in}>{$vo}</label>
                                                    {/foreach}
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <div class="layer-footer">
                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                    </div>
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            </div>
            <div class="tab-pane fade" id="tab-sms">
                <div class="widget-body no-padding">
                    <div class="alert alert-warning-light">
                        <p>本插件使用阿里云短信服务来实现登录验证码的发送，如果开启了"手机验证码"的登录方式，则必填</p>
                    </div>
                    <form id="sms-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST">
                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <td width="20%">{:__('阿里云AppKeyId')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-sms-app_key_id" class="form-control" type="text" name="row[sms][app_key_id]" title="" value="{$row.sms.app_key_id|default=''}" placeholder="" data-tip="">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('阿里云AppKeySecret')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-sms-app_key_secret" class="form-control" type="text" name="row[sms][app_key_secret]" title="" value="{$row.sms.app_key_secret|default=''}" placeholder="" data-tip="">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('阿里云短信签名')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-sms-sign_name" class="form-control" type="text" name="row[sms][sign_name]" title="" value="{$row.sms.sign_name|default=''}" placeholder="" data-tip="">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('验证码短信模板')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-sms-template_code" class="form-control" type="text" name="row[sms][template_code]" title="" value="{$row.sms.template_code|default=''}" placeholder="例如：SMS_187541" data-tip="SM_开头的短信模板code">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <div class="layer-footer">
                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                    </div>
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            </div>
            <div class="tab-pane fade" id="tab-mp">
                <div class="widget-body no-padding">
                    <div class="alert alert-warning-light">
                        <p>如果是H5方式使用，并在微信内打开希望用户实现自动登录时填写</p>
                    </div>
                    <form id="mp-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST">
                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <td width="20%">{:__('公众号AppId')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-mp-app_id" class="form-control" type="text" name="row[mp][app_id]" title="" value="{$row.mp.app_id|default=''}" placeholder="选填">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('公众号AppSecret')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-mp-app_secret" class="form-control" type="text" name="row[mp][app_secret]" title="" value="{$row.mp.app_secret|default=''}" placeholder="选填">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('微信网页自动登录')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <div class="radio">
                                                {foreach name="yesOrNo" item="vo"}
                                                <label for="row[mp][mp_login]-{$key}"><input id="row[mp][mp_login]-{$key}" type="radio" name="row[mp][mp_login]" title="" value="{$key}" data-tip="" {in name="key" value="$row.mp.mp_login|default=0"}checked{/in}>{$vo}</label>
                                                {/foreach}
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <div class="layer-footer">
                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                    </div>
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            </div>
            <div class="tab-pane fade" id="tab-notice">
                <div class="widget-body no-padding">
                    <div class="alert alert-warning-light">
                        <p>本插件使用百度语音合成，如果开启了"订单通知"的登录方式，则必填</p>
                    </div>
                    <form id="notice-form" class="edit-form form-horizontal" role="form" data-toggle="validator" method="POST">
                        <table class="table table-striped">
                            <tbody>
                            <tr>
                                <td width="20%">{:__('百度AppId')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-notice-app_id" class="form-control" type="text" name="row[notice][app_id]" title="" value="{$row.notice.app_id|default=''}" placeholder="" data-tip="">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>{:__('百度AppSecret')}</td>
                                <td>
                                    <div class="row">
                                        <div class="col-sm-8 col-xs-12">
                                            <input id="c-notice-app_secret" class="form-control" type="text" name="row[notice][app_secret]" title="" value="{$row.notice.app_secret|default=''}" placeholder="" data-tip="">
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                            <tfoot>
                            <tr>
                                <td></td>
                                <td>
                                    <div class="layer-footer">
                                        <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                                    </div>
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>